#ifndef __PLASTIC_H
#define __PLASTIC_H

#include <stdbool.h>
#include "base.h"
struct _plastic
{
    double Ke;
};




typedef struct _plasticfun
{
    // check status is yeild
    bool (*ISyeild)(Stress, Strain);

    //∂f/∂σ
    //f:yield function
    //σij 3-D Stress variable
    //return:{∂f/∂σxx, ∂f/∂σyy, ∂f/∂σzz, ∂f/∂σxy, ∂f/∂σyz, ∂f/∂σzx}T
    double* (*df_dsigma)(Stress, Strain);

    //∂g/∂σ
    //g:Plastic Potential Function;
    //σij 3-D Stress variable
    //return:{∂g/∂σxx, ∂g/∂σyy, ∂g/∂σzz, ∂g/∂σxy, ∂g/∂σyz, ∂g/∂σzx}T
    double* (*dg_dsigma)(Stress, Strain);
    
    //∂f/∂H
    //(in)f:yield function
    //(in)H:Hardening function
    //return:{double *}
    double* (*df_dH)(Stress, Strain);

    //∂H/∂εp
    //(in)εp_ij: plastic strain
    //(in)H: Hardening function
    //return:{∂H/∂εpxx, ∂H/∂εpyy, ∂H/∂εpzz, ∂H/∂εpxy, ∂H/∂εpyz, ∂H/∂εpzx}T
    double* (*dH_depsP)(Stress, Strain);

    
    double* (*CalcuA)(Stress, Strain);


    //Loading criteria
    int (*checkloading)(Stress, Strain);

    //Plastic scalar factor Λ
    //dεpij = dΛ ∂g/∂σ

    Stress dStress;

} PlasticModel;

#endif